package com.qy.service.impl;

import com.qy.base.core.Constants;
import com.qy.base.core.ServiceException;
import com.qy.dao.PolicyMapper;
import com.qy.model.Evaluation;
import com.qy.model.Policy;
import com.qy.service.PolicyService;
import com.qy.base.core.AbstractService;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;


/**
 * Created by zaq on 2018/07/10.
 */
@Service
@Transactional
public class PolicyServiceImpl extends AbstractService<Policy> implements PolicyService {
    @Resource
    private PolicyMapper qyPolicyMapper;

    @Resource
    private PolicyService policyService;

    @Override
    public List<Policy> selectAllPolicy(Policy policy) {
        return qyPolicyMapper.selectAllPolicy(policy);
    }

    @Override
    public List<Policy> selectPolicyById(Policy policy) {
        return qyPolicyMapper.selectPolicyById(policy);
    }

    @Override
    public List<Map> managePolicyList(Policy policy) {
        return qyPolicyMapper.managePolicyList(policy);
    }

    @Override
    public Policy seePolicy(Integer id) {
        return qyPolicyMapper.seePolicy(id);
    }

    @Override
    public void deletePolicy(Policy policy) {
        qyPolicyMapper.deletePolicy(policy);
    }

    @Override
    public void policyState(Policy policy) {
        qyPolicyMapper.policyState(policy);
    }

    @Override
    public List<Map> selectFirstPolicyListByEvaluation1(Evaluation evaluation) {
        return qyPolicyMapper.selectFirstPolicyListByEvaluation1(evaluation);
    }

    @Override
    public List<Map> selectSecondPolicyListByEvaluation1(Evaluation evaluation) {
        return qyPolicyMapper.selectSecondPolicyListByEvaluation1(evaluation);
    }

    @Override
    public List<Map> selectThirdPolicyListByEvaluation1(Evaluation evaluation) {
        return qyPolicyMapper.selectThirdPolicyListByEvaluation1(evaluation);
    }

    @Override
    public List<Map> selectFourthPolicyListByEvaluation1(Evaluation evaluation) {
        return qyPolicyMapper.selectFourthPolicyListByEvaluation1(evaluation);
    }

    @Override
    public List<Map> selectFirstPolicyListByEvaluation2(Evaluation evaluation) {
        return qyPolicyMapper.selectFirstPolicyListByEvaluation2(evaluation);
    }

    @Override
    public List<Map> selectSecondPolicyListByEvaluation2(Evaluation evaluation) {
        return qyPolicyMapper.selectSecondPolicyListByEvaluation2(evaluation);
    }

    @Override
    public List<Map> selectThirdPolicyListByEvaluation2(Evaluation evaluation) {
        return qyPolicyMapper.selectThirdPolicyListByEvaluation2(evaluation);
    }

    @Override
    public List<Map> selectFourthPolicyListByEvaluation2(Evaluation evaluation) {
        return qyPolicyMapper.selectFourthPolicyListByEvaluation2(evaluation);
    }

    @Override
    public List<Map> selectFirstPolicyListByEvaluation3(Evaluation evaluation) {
        return qyPolicyMapper.selectFirstPolicyListByEvaluation3(evaluation);
    }

    @Override
    public List<Map> selectFirstPolicyListByEvaluation4(Evaluation evaluation) {
        return qyPolicyMapper.selectFirstPolicyListByEvaluation4(evaluation);
    }

    @Override
    public List<Map> selectSecondPolicyListByEvaluation4(Evaluation evaluation) {
        return qyPolicyMapper.selectSecondPolicyListByEvaluation4(evaluation);
    }

    @Override
    public List<Map> selectThirdPolicyListByEvaluation4(Evaluation evaluation) {
        return qyPolicyMapper.selectThirdPolicyListByEvaluation4(evaluation);
    }

    @Override
    public List<Map> selectFourthPolicyListByEvaluation4(Evaluation evaluation) {
        return qyPolicyMapper.selectFourthPolicyListByEvaluation4(evaluation);
    }

    @Override
    public List<Map> selectFirstPolicyListByEvaluation5(Evaluation evaluation) {
        return qyPolicyMapper.selectFirstPolicyListByEvaluation5(evaluation);
    }

    @Override
    public List<Map> selectSecondPolicyListByEvaluation5(Evaluation evaluation) {
        return qyPolicyMapper.selectSecondPolicyListByEvaluation5(evaluation);
    }

    @Override
    public List<Map> selectFirstPolicyListByEvaluation6(Evaluation evaluation) {
        return qyPolicyMapper.selectFirstPolicyListByEvaluation6(evaluation);
    }

    @Override
    public List<Policy> selectPolicyByName(Policy policy) {
        return qyPolicyMapper.selectPolicyByName(policy);
    }

    @Override
    public List<Map<String, Object>> selectByClueId(Integer clue_id) {
        return qyPolicyMapper.selectByClueId(clue_id);
    }

}
